     
      integer itmp(12)
      character*200 line

      call getarg(1,line)
      open(1,file=line,form='formatted')
      call getarg(2,line)
      open(12,file=line,form='formatted')
      ym=1880
      if(iargc()>2) then
        call getarg(3,line)
        read(line,*) ym
      end if
      write(*,*) 'removing data before year',ym


   10 read(1,'(i3,i9,i4,12i5)',end=100) icc,id,iyr,itmp
      if(iyr.ge.ym) write (12,'(i3,i9.9,i4,12i5)') icc,id,iyr,itmp
      go to 10

  100 stop
      end
